/**
 * @author BelovedLYC
 * @date 2025-05-31
 * @description 登录服务 支持邮箱登陆和二维码登陆
 * @description 登录服务 支持邮箱登陆和二维码登陆
 */

import request, { type ApiResponse } from "../request";
import { QrCodeStatus } from "../../enum";

export interface QrCodeStatusResponse {
  status: QrCodeStatus;
  userId?: string;
  device?: {
    deviceName: string;
    deviceType: number;
  };
}
export const getQrCodeStatusRequest = async (
  qrCodeId: string
): Promise<ApiResponse<QrCodeStatusResponse>> => {
  return await request.get(`/user/login/qrcode/status/${qrCodeId}`, {
    headers: {
      "X-Device-Id": qrCodeId,
    },
  });
};
